from socket import *
ADDR=('127.0.0.1',10001)
#创建

while True:
    tcp_socket = socket()
    tcp_socket.connect(ADDR)
    msg=input('>>')
    tcp_socket.send(msg.encode())
    data=tcp_socket.recv(1024)
    print('Server',data.decode())
    tcp_socket.close()